package com.zzyl.oss.config;

import com.zzyl.oss.utils.AliyunOSSOperator;
import com.zzyl.oss.utils.AliyunOSSProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OssConfig {
    private final AliyunOSSProperties aliyunOSSProperties;

    public OssConfig(AliyunOSSProperties aliyunOSSProperties) {
        this.aliyunOSSProperties = aliyunOSSProperties;
    }

    @Bean
    public AliyunOSSOperator aliyunOSSOperator(){
        return new AliyunOSSOperator(aliyunOSSProperties);
    }
}
